package com.example.demo.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.example.demo.entity.User;
import com.example.demo.entity.Userinfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * <p>
 *  mapper 接口
 * </p>
 *
 * @author Fyly
 * @since 2019-02-20
 */

@Repository
public interface UserMapper extends BaseMapper<User> {

    User getUserById(@Param("id") int id);

    @Select("SELECT  id from  user WHERE openId = #{openId}")
    User selectByOpenid(@Param("openId") String openId);


}
